package cn.qq.xiangmu.entity;

public class Dog {
    private String name;
    private int health;
    private int love;
    private String strain;

    public Dog() {
        this("匿名",50,50,"土狗");//this调用构造函数，必须写在第一行。
    }

    public Dog(String name, int health, int love, String strain) {
        this.name = name;
        this.love = love;
        this.health = health;
        this.strain = strain;
    }

    public int getHealth() {
        return health;
    }

    public void setHealth(int health) {

        this.health = health;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getLove() {
        return love;
    }

    public String getStrain() {
        return strain;
    }

    public void setStrain(String strain) {
        this.strain = strain;
    }

    public void setLove(int love) {
        this.love = love;
    }

    public void print() {
        System.out.println("宠物的自白");
        System.out.println("我的名字叫" + name + "，健康值是" + health + "和主人的亲密度是" + love + ",我是一只" + strain);
    }

}
